'use strict';

const { Service } = require('egg');

class FoodCategoryService extends Service {

  async create(foodCategory){
    let newFoodCategory = new this.ctx.model.Foodcategory();
    newFoodCategory = Object.assign(newFoodCategory, foodCategory);
    newFoodCategory.save();
  }

  async findAll(){
    console.log(this.ctx.model,'this.ctx.model.FoodCategory');
    return this.ctx.model.Foodcategory.find({});
  }

}

module.exports = FoodCategoryService;
